<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <?php include_http_metas() ?>
    <?php include_metas() ?>
    <?php include_title() ?>
    <link rel="shortcut icon" href="/favicon.ico" />
    
    <link href="/site/jquery-ui-1.css" type="text/css" rel="Stylesheet">	
    <!--[if IE 7]><link rel="stylesheet" href="css/ie.css" type="text/css" media="screen, projection" /><![endif]-->
    <!--[if IE 6]><link rel="stylesheet" href="css/ie6.css" type="text/css" media="screen, projection" /><![endif]-->
    <link href="/site/style.css" type="text/css" rel="stylesheet">
    <link href="/site/style_003.css" type="text/css" rel="stylesheet">
    <link media="screen" href="/site/superfish.css" type="text/css" rel="stylesheet">
    <!--[if IE]>
      <style type="text/css">
        .clearfix {
          zoom: 1;     /* triggers hasLayout */
          display: block;     /* resets display for IE/Win */
          }  /* Only IE can see inside the conditional comment
          and read this CSS rule. Don't ever use a normal HTML
          comment inside the CC or it will close prematurely. */
      </style>
    <![endif]-->
    <!-- JavaScript -->
    <script src="/site/jquery-1.js" type="text/javascript"></script>
    <script src="/site/jquery-ui-1.js" type="text/javascript"></script>
    <script src="/site/hoverIntent.js" type="text/javascript"></script>
    <script src="/site/superfish.js" type="text/javascript"></script>
    <script type="text/javascript">
      // initialise plugins
      jQuery(function(){
        jQuery('ul.sf-menu').superfish();
      });
    </script>
    <script src="/site/excanvas.js" type="text/javascript"></script>
    <script src="/site/jquery.js" type="text/javascript"></script>
      <script src="/site/jquery_002.js" type="text/javascript"></script>
    <script src="/site/set.js" type="text/javascript"></script>
      <script src="/site/custom.js" type="text/javascript"></script> 
      
     <!--[if IE]><script language="javascript" type="text/javascript" src="excanvas.pack.js"></script><![endif]-->
     
    <?php include_stylesheets() ?>
    <?php include_javascripts() ?>
    <!-- <link href="/site/style_0021.css" media="all" type="text/css" rel="stylesheet">-->
    <style type='text/css'>
      #sf_admin_container label {
        color: #666666;
        display: block;
        float: left;
        font-weight: normal !important;
        padding: 7px 1em 3px 0;
        text-align: left;
        width: 8em;
      }
      
    </style>
  </head>
   <?php //date_default_timezone_set('Asia/Ho_Chi_Minh'); ?>
  <body>
<?php if ($sf_user->isAuthenticated()): ?>
  <div class="left" id="sidebar">
    <h2 class="ico_mug">Manager</h2>
    <ul id="menu">
      <li>
        <?php if ($sf_user->hasCredential('super admin')): ?>
          <a class="ico_user" href="#"><?php echo __('Users') ?> </a>
          <ul id="user">
            <li><?php echo link_to(__('Add user'), 'user/new') ?></li>
            <li><?php echo link_to(__('Manage user'), 'user/index') ?></li>
          </ul>
        <?php endif; ?>
        <a class="ico_page" href="#"><?php echo __('News') ?></a>
        <ul id="news">
          <li><?php echo link_to(__('Add news'), 'news/new') ?></li>
          <li><?php echo link_to(__('Manage news'), 'news/index') ?></li>
          <li><?php echo link_to(__('Add news type'), 'news_type/new') ?></li>
          <li><?php echo link_to(__('Manage news type'), 'news_type/index') ?></li>
        </ul>
        <a class="ico_settings" href="#"><?php echo __('Product') ?></a>
        <ul id="products">
          <li><?php echo link_to(__('Add product'), 'product/new') ?></li>
          <li><?php echo link_to(__('Manage product'), 'product/index') ?></li>
          <li><?php echo link_to(__('Add color'), 'color/new') ?></li>
          <li><?php echo link_to(__('Manage color'), 'color/index') ?></li>
          <li><?php echo link_to(__('Add supplier'), 'supplier/new') ?></li>
          <li><?php echo link_to(__('Manage supplier'), 'supplier/index') ?></li>
          <li><?php echo link_to(__('Add group'), 'group/new') ?></li>
          <li><?php echo link_to(__('Manage group'), 'group/index') ?></li>
          <li><?php echo link_to(__('Add product type'), 'product_type/new') ?></li>
          <li><?php echo link_to(__('Manage product type'), 'product_type/index') ?></li>
        </ul>
        <?php /*
        <a class="ico_settings" href="#"><?php echo __('Land for hire') ?></a>
        <ul id="hire">
          <li><?php echo link_to(__('Add land for hire'), 'land_for_hire/new') ?></li>
          <li><?php echo link_to(__('Manage land for hire'), 'land_for_hire/index') ?></li>
          <li><?php echo link_to(__('Add land for hire type'), 'land_for_hire_type/new') ?></li>
          <li><?php echo link_to(__('Manage land for hire type'), 'land_for_hire_type/index') ?></li>
        </ul>
        <a class="ico_posts" href="#"><?php echo __('Direction') ?></a>
        <ul id="direction">
          <li><?php echo link_to(__('Add direction'), 'direction/new') ?></li>
          <li><?php echo link_to(__('Manage direction'), 'direction/index') ?></li>
        </ul>
        <a class="ico_posts" href="#"><?php echo __('District') ?></a>
        <ul id="district">
          <li><?php echo link_to(__('Add district'), 'district/new') ?></li>
          <li><?php echo link_to(__('Manage district'), 'district/index') ?></li> 
        </ul> */ ?>
      </li>
    </ul>
  </div><!-- end #sidebar -->
<?php endif ?>

<div id="container" class="container">
    <div id="header">
    	<div id="profile_info">
			<img alt="avatar" id="avatar" src="/site/avatar.jpg">
			<!--<p>Welcome <strong>Hindua88</strong>. <a href="#">Log out?</a></p>-->      
      <?php if ($sf_user->isAuthenticated()): ?>
        <?php echo link_to('<font color=white>'.__('Log out').'</font>', 'user/logout') ?>
        <?php echo '<font color=blue>'.$sf_user->getUserName().'</font>' ?>
      <?php else : ?>
        <?php echo link_to('<font color=white>'.__('Login').'</font>', 'user/login') ?>
      <?php endif ?>
		</div>
		<div id="logo"></div>
    </div><!-- end header -->
	    <div id="content">
        <div class="clearfix" id="top_menu">
          <ul class="sf-menu sf-js-enabled sf-shadow"> <!-- DROPDOWN MENU -->
            <?php if ($sf_user->hasCredential('super admin')): ?>
              <li class="current">
                <a href="#a" class="sf-with-ul"><?php echo __('Users') ?><span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a><!-- First level MENU -->
                <ul style="display: none; visibility: hidden;"> 
                  <li><?php echo link_to(__('Add user'), 'user/new') ?></li>
                  <li><?php echo link_to(__('Manage user'), 'user/index') ?></li>
                  <!--
                  <li class="current">
                    <a href="#ab" class="sf-with-ul">Blog settings<span class="sf-sub-indicator"> »</span><span class="sf-sub-indicator"> »</span></a>  Second level MENU 
                    <ul style="display: none; visibility: hidden;">
                      <li class="current"><a href="#">Settings</a></li>
                      <li><a href="#aba">menu item</a></li>
                      <li><a href="#abb">menu item</a></li>
                      <li><a href="#abc">menu item</a></li>
                      <li><a href="#abd">menu item</a></li>
                    </ul>
                  </li>
                  -->
                </ul>
              </li>
            <?php endif; ?>
            <li class="">
              <a href="#"><?php echo __('News') ?></a>
              <ul style="display: none; visibility: hidden;">
                <li><?php echo link_to(__('Add news'), 'news/new') ?></li>
                <li><?php echo link_to(__('Manage news'), 'news/index') ?></li>
              </ul>
            </li>
            <li class="">
              <a href="#"><?php echo __('Product') ?></a>
              <ul style="display: none; visibility: hidden;">
                <li><?php echo link_to(__('Add product'), 'product/new') ?></li>
                <li><?php echo link_to(__('Manage product'), 'product/index') ?></li>
              </ul>
            </li>
            <?php /*
            <li class="">
              <a href="#"><?php echo __('Land for hire') ?></a>
              <ul style="display: none; visibility: hidden;">
                <li><?php echo link_to(__('Add land for hire'), 'land_for_hire/new') ?></li>
                <li><?php echo link_to(__('Manage land for hire'), 'land_for_hire/index') ?></li>
                <li><?php echo link_to(__('Add land for hire type'), 'land_for_hire_type/new') ?></li>
                <li><?php echo link_to(__('Manage land for hire type'), 'land_for_hire_type/index') ?></li>
              </ul>
            </li>    
            <li class="">
              <a href="#"><?php echo __('Direction') ?></a>
              <ul style="display: none; visibility: hidden;">
                <li><?php echo link_to(__('Add direction'), 'direction/new') ?></li>
                <li><?php echo link_to(__('Manage direction'), 'direction/index') ?></li>
              </ul>
            </li>
            <li class="">
              <a href="#"><?php echo __('District') ?></a>
              <ul style="display: none; visibility: hidden;">
                <li><?php echo link_to(__('Add district'), 'district/new') ?></li>
                <li><?php echo link_to(__('Manage district'), 'district/index') ?></li>
              </ul>
            </li>
          </ul>
          */ ?>
        <!--<a class="right" id="visit" href="#">Visit site</a> -->
        </div>
        <div class="clearfix" id="content_main">
          <div class="left" id="main_panel_container">
          </div>
          <?php echo $sf_content ?>
        </div><!-- end #content_main -->
        
        
	    </div><!-- end #content -->
    <div class="clearfix" id="footer">
    	<p class="left">www.aim.com</p>
		<p class="right">&copy; 2011 Hindua &amp; FirstLove88</p>
	</div><!-- end #footer -->
</div><!-- end container -->
<div id="ufooter">
  <!--<button class="ui-state-default ui-corner-all left" type="button">Ok</button>-->
</div>
</body>
<script>
  /*
  var path = window.location.pathname;
  var arr = path.split("/");
  var result = arr[2];
  if (result != '') {
    if (result == 'product') {
      $('#menu ul').hide();
      $('#menu #products').show();
    } else if (result == 'color') {
      $('#menu ul').hide();
      $('#menu #products').show();
    } else if (result == 'news') {
      $('#menu ul').hide();
      $('#menu #news').show();
    }
  } else { 
    $('#menu ul:first').show();
  }
  $('#menu li a').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
      }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
      $('#menu ul:visible').slideUp('normal');
      checkElement.slideDown('normal');
      }
    }
  ); */
</script>
</html>
